Bits from Debian: New Debian Developers and Maintainers (March and April 2021)
- Jeroen Ploemen (jcfp)
- Mark Hindley (leepen)
- Scarlett Moore (sgmoore)
- Baptiste Beauplat (lyknode)
- Gunnar Ingemar Hjalmarsson
- Stephan Lachnit
Interestingly as well, while in the vaccine issue, Brazil Anvisa doesn t know what they are doing or the regulator just isn t knowledgeable etc. (statements by various people in GOI, when it comes to testing kits, the same is an approver.)
To create a new apps script, click "New project" from the scripts dashboard: this will open a code editor, so now cut and paste this code (change the label name to match the one you want to use, and the header too if you're going to use this for another team):
function tagPythonTeamEmails()
// search for all recent threads (hours is the smallest interval searchable)
var threads = GmailApp.search("newer_than:1h");
// this is the label i want to apply to the messages
var label = GmailApp.getUserLabelByName("Debian_Python_Pkgs"); // <-- EDIT THIS
for (var i = 0; i < threads.length; i++)
// get all messages in a given thread
var messages = threads[i].getMessages();
// for each message in the thread
for (var j = 0; j < messages.length; j++)
var message = messages[j];
// needed to have access to the full email: headers + body
var email = message.getRawContent();
// this is the header i want to check for: if present, add label and archive
if (email.indexOf("X-Distro-Tracker-Team: python") > -1) // <-- EDIT THIS
threads[i].addLabel(label);
threads[i].moveToArchive();
(This code is largely inspired by this StackOverflow answer.)
Given we're going to perform changes to the emails, we need to add extra permissions to the script; first we need to toggle the option "View > Show manifest file" which will show the appsscript.json file. Once done, edit it and update the scope of the script to include:
"oauthScopes": [
...
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.modify"
],
These new permission will be granted when we deploy the script, which we can actually do right now: from the editor window click on "Publish > Deploy from manifest..." and then "Install add-on"; it will make the app script available to operate on Gmail by opening the usual Google grants authorization popup.
Unlike filters defined on the web UI, apps scripts are not triggered every time a mail is received (there's a pub-sub mechanism, but it doesn't look like it would work for this), so if we want to execute periodically the new script, we need to create a time-driven trigger.
The simplest way is probably from the script editor (but you can also follow this doc): "View > Current project's triggers" and then "Add trigger" from there. For my specific use-case i set:
Be aware of quotas and limitations for Apps scripts; in particular the "Triggers total runtime" set to "90 min / day" is what led me to set the trigger every 510 mins.
Use the scripts dashboard (doc) to monitor the script execution logs, in the "My Executions" section, and specifically the "Duration" column: the script execution time depends exclusively on the number of emails to process at every execution, so fine-tune the trigger time to stay within your quota.
The newer_than search operator doesn't allow a granularity smaller than hours (although that's not even documented), so that means we're going to scan multiple times the same emails.
UPDATE (2020-12-26): I've already had to bump from every 5 to every 10 minutes, as otherwise i'd get Exception: Service invoked too many times for one day: gmail. (remember the quota!)
# On the source tar -C / -zcf - home nc -l -p 12345 -N # On the target nc 10.0.0.1 12345 tar -C / -zxf -
mk-build-deps
from the devscripts
package to create metapackages that make sure they are
installed.
Here's an extract from debian/control
of the metapackage:
Source: enrico Section: admin Priority: optional Maintainer: Enrico Zini <enrico@debian.org> Build-Depends: debhelper (>= 11) Standards-Version: 3.7.2.1 Package: enrico Section: admin Architecture: all Depends: mc, mmv, moreutils, powertop, syncmaildir, notmuch, ncdu, vcsh, ddate, jq, git-annex, eatmydata, vdirsyncer, khal, etckeeper, moc, pwgen Description: Enrico's working environment Package: enrico-devel Section: devel Architecture: all Depends: git, python3-git, git-svn, gitk, ansible, fabric, valgrind, kcachegrind, zeal, meld, d-feet, flake8, mypy, ipython3, strace, ltrace Description: Enrico's development environment Package: enrico-gui Section: x11 Architecture: all Depends: xclip, gnome-terminal, qalculate-gtk, liferea, gajim, mumble, sm, syncthing, virt-manager Recommends: k3b Description: Enrico's GUI environment Package: enrico-sanity Section: admin Architecture: all Conflicts: libapache2-mod-php, libapache2-mod-php5, php5, php5-cgi, php5-fpm, libapache2-mod-php7.0, php7.0, libphp7.0-embed, libphp-embed, libphp5-embed Description: Enrico's sanity Metapackage with a list of packages that I do not want anywhere near my system.
/home
and installing packages takes care of 99% of my needs.
There are a few system-wide tweaks I cannot do without:
/etc/NetworkManager/system-connections/
update-alternatives --config editor
systemctl restart network-manager
are enough. Note that Network Manager
will ignore the files unless their owner and permissions are what it expects.
Fine tuning
Comparing the output of dpkg --get-selections
between the old and the new
system might highlight packages manually installed in a hurry and not added to
the metapackages.
Finally, what remains is fixing the sad state of mimetype associations,
which seem to associate opening file depending on whatever application was
installed last, phases of the moon, and what option is the most annoying.
Currently on my system, PDFs are opened in inkscape by xdg-open
and in
calibre by run-mailcap
. Let's see how long it takes to figure this one out.
It's the end of the world as we know it, twice as fast
After Homemade Instruments Week on the facebook page, here is an article with some PVC pipes instruments! Percussion on PVC pipes A classic, long pipes for big bass, easy to tune by changing the length
"Ut queant laxis" or "Hymnus in Ioannem" is a Latin hymn in honor of John the Baptist, written in Horatian Sapphics and traditionally attributed to Paulus Diaconus, the eighth-century Lombard historian. It is famous for its part in the history of musical notation, in particular solmization. The hymn belongs to the tradition of Gregorian chant.
.co
domains.
Leading to this auto linking:
Now I'm not sure if someone enocountered the same issue, or people just registered
random domains just because they could. I found registrations for
.conf
files in /etc
which could be interesting in an IT environment, but for the sake of playing with
it I registered nsswitch.co
at godaddy. I do not want to endorse them in
anyway, but for the first year it's only 13.08EUR right now, which is okay to
pay for a stupid demo. So if you feel like it, you can probably register something stupid for yourself to play around with. I do not intent to renew this domain next year, so
be aware of what happens then with the next owner.
appstreamcli
, this time I decided to try what the cool kids are doing and make a web application that runs in your browser and creates all metadata there.
So, behold the MetaInfo Creator! If you click this link, you will end up at an Angular-based web application that will let you generate MetaInfo/AppData files for a few component-types simply by answering a set of questions.
The intent was to make this tool as easy to use as possible for someone who basically doesn t know anything about AppStream at all. Therefore, the tool will:
npm
is actually pretty nice there is a module available for most things, and adding a new dependency is easy. NPM will also manage all the details of your dependency chain, GitHub will warn about security issues in modules you depend on, etc. So, from a usability perspective, there isn t much to complain about (unlike with Python, where creating or using a module ends up as a fight the system event way too often and the question which random file do I need to create now to achieve what I want? always exists. Fortunately, Poetry made this a bit more pleasant for me recently).
So, tl;dr for this section: The web application development excursion was actually a lot of fun, and I may make more of those in future, now that I learned more about how to write web applications. Ultimately though, I enjoy the lower-level software development and backend development a bit more.
Summary
Check out the MetaInfo Creator and its source code, if you want to create MetaInfo files for a GUI application, console application, addon or service component quickly.
-n
option for dpt-takeover
in how to adopt pkg-perl manual.$ sudo apt-get install gobby
$ sudo gobby infinote://gobby.debian.org/debconf17/talk/ayatana-indicators
The major outcome of this talk was getting to know Dimitri John Ledkov from the Foundation Team at Canonical Ltd. We agreed on investigating the following actions, targetting the Ubuntu 18.04 LTS release and later on Debian 10 (aka buster):
Upstream Todos
apt-get update apt-get upgrade apt-get autoremove apt-get clean dpkg --list > original.dpkg apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64 mawk:amd64 for pack32 in $(grep i386 original.dpkg egrep "^ii " awk ' print $2 ' ) ; do echo $pack32 ; apt-get --download-only install -y --allow-remove-essential $ pack32%:i386 :amd64 ; done cd /var/cache/apt/archives/ dpkg --install libacl1_*amd64.deb libattr1_*_amd64.deb libapt-pkg5.0_*amd64.deb libbz2-1.0_*amd64.deb dpkg_*amd64.deb tar_*amd64.deb apt_*amd64.deb bash_*amd64.deb dash_*amd64.deb dpkg --install --skip-same-version *.deb dpkg --configure --pending dpkg --install --skip-same-version *.deb dpkg --remove libcurl4-openssl-dev:i386 dpkg --configure --pending dpkg --remove libkdesu5 kde-runtime apt-get --fix-broken install apt-get install $(egrep "^ii" ~/original.dpkg grep -v ":i386" grep -v "all" grep -v "aiccu" grep -v "acroread" grep -v "flashplayer-mozilla" grep -v "flash-player-properties" awk ' print $2 ')Reboot. Then the system failed to boot, missing lvm2 package. Boot with a live CD.
sudo -i mount /dev/sdc2 /mnt mount /dev/vg100/usr /mnt/usr mount /dev/vg100/var /mnt/var mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys mount -o bind /dev/ /mnt/dev mount -o bind /dev/pts /mnt/dev/pts chroot /mnt /bin/su - apt-get install lvm2 exit rebootStill somethings do not work, like command fakeroot.
for pack32 in $(grep i386 original.dpkg egrep "^ii " awk ' print $2 ' ) ; do echo $pack32 ; if dpkg --status $pack32 grep -q "Multi-Arch: same" ; then apt-get -y install $ pack32%:i386 :amd64 ; fi ; done for pack32 in $(grep i386 original.dpkg egrep "^ii " awk ' print $2 ' ) ; do echo $pack32 ; apt-get -y install $ pack32%:i386 :amd64 ; doneNow is time to find what still does not work and how to solve it.
~/.mutt/aliases
, a flat text file consisting of mutt
alias
commands~/.mutt/aliases
, Debian s LDAP database, and Canonical s LDAP database,
so that I can search by name with Ctrl-t in mutt
when composing a new messagemutt
such that I can continue using the same query interfacemutt
, and whatever query glue was necessary to get mutt
to understand vCards.
There are lots of different alternatives here, and if anything the problem
was an embarrassment of choice. In the end I just decided to go for things
that looked roughly the right shape for me and tried not to spend too much
time in analysis paralysis.
CardDAV server
I went with Xandikos for the
server, largely because I know Jelmer and have generally had pretty good
experiences with their software, but also because using Git for history of
the backend storage seems like something my future self will thank me for.
It isn t packaged in stretch, but it s in Debian unstable, so I installed it
from there.
Rather than the standalone mode suggested on the web page, I decided to set
it up in what felt like a more robust way using WSGI. I installed uwsgi
,
uwsgi-plugin-python3
, and libapache2-mod-proxy-uwsgi
, and created the
following file in /etc/uwsgi/apps-available/xandikos.ini
which I then
symlinked into /etc/uwsgi/apps-enabled/xandikos.ini
:
[uwsgi]
socket = 127.0.0.1:8801
uid = xandikos
gid = xandikos
umask = 022
master = true
cheaper = 2
processes = 4
plugin = python3
module = xandikos.wsgi:app
env = XANDIKOSPATH=/srv/xandikos/collections
xandikos
user and group first (adduser --system --group --no-create-home
--disabled-login xandikos
). I created /srv/xandikos
owned by
xandikos:xandikos
and mode 0700, and I recommend setting a
umask as shown above since uwsgi s default
umask is 000 (!). You should also run sudo -u xandikos xandikos -d
/srv/xandikos/collections --autocreate
and then Ctrl-c it after a short
time (I think it would be nicer if there were a way to ask the WSGI wrapper
to do this).
For Apache setup, I kept it reasonably simple: I ran a2enmod proxy_uwsgi
,
used htpasswd
to create /etc/apache2/xandikos.passwd
with a username and
password for myself, added a virtual host in
/etc/apache2/sites-available/xandikos.conf
, and enabled it with a2ensite
xandikos
:
<VirtualHost *:443>
ServerName xandikos.example.org
ServerAdmin me@example.org
ErrorLog /var/log/apache2/xandikos-error.log
TransferLog /var/log/apache2/xandikos-access.log
<Location />
ProxyPass "uwsgi://127.0.0.1:8801/"
AuthType Basic
AuthName "Xandikos"
AuthBasicProvider file
AuthUserFile "/etc/apache2/xandikos.passwd"
Require valid-user
</Location>
</VirtualHost>
service apache2 reload
, set the new virtual host up with Let s
Encrypt, reloaded again, and off we go.
Android integration
I installed DAVdroid from the Play Store: it
cost a few pounds, but I was OK with that since it s GPLv3 and I m happy to
help fund free software. I created two accounts, one for my existing Google
Contacts database (and in fact calendaring as well, although I don t intend
to switch over to self-hosting that just yet), and one for the new Xandikos
instance. The Google
setup was a bit fiddly
because I have two-step verification turned on so I had to create an
app-specific password. The Xandikos setup was straightforward: base URL,
username, password, and done.
Since I didn t completely trust the new setup yet, I followed what seemed
like the most robust option from the DAVdroid contacts syncing
documentation,
and used the stock contacts app to export my Google Contacts account to a
.vcf
file and then import that into the appropriate DAVdroid account
(which showed up automatically). This seemed straightforward and everything
got pushed to Xandikos. There are some weird delays in syncing contacts
that I don t entirely understand, but it all seems to get there in the end.
mutt integration
First off I needed to sync the contacts. (In fact I happen to run mutt
on
the same system where I run Xandikos at the moment, but I don t want to rely
on that, and going through the CardDAV server means that I don t have to
poke holes for myself using filesystem permissions.) I used
vdirsyncer for this. In
~/.vdirsyncer/config
:
[general]
status_path = "~/.vdirsyncer/status/"
[pair contacts]
a = "contacts_local"
b = "contacts_remote"
collections = ["from a", "from b"]
[storage contacts_local]
type = "filesystem"
path = "~/.contacts/"
fileext = ".vcf"
[storage contacts_remote]
type = "carddav"
url = "<Xandikos base URL>"
username = "<my username>"
password = "<my password>"
vdirsyncer discover
and vdirsyncer sync
then synced everything
into ~/.contacts/
. I added an hourly crontab
entry to run vdirsyncer
-v WARNING sync
.
Next, I needed a command-line address book tool based on this.
khard looked about right and is in
stretch, so I installed that. In ~/.config/khard/khard.conf
(this is
mostly just the example configuration, but I preferred to sort by first name
since not all my contacts have neat first/last names):
[addressbooks]
[[contacts]]
path = ~/.contacts/<UUID of my contacts collection>/
[general]
debug = no
default_action = list
editor = vim
merge_editor = vimdiff
[contact table]
# display names by first or last name: first_name / last_name
display = first_name
# group by address book: yes / no
group_by_addressbook = no
# reverse table ordering: yes / no
reverse = no
# append nicknames to name column: yes / no
show_nicknames = no
# show uid table column: yes / no
show_uids = yes
# sort by first or last name: first_name / last_name
sort = first_name
[vcard]
# extend contacts with your own private objects
# these objects are stored with a leading "X-" before the object name in the vcard files
# every object label may only contain letters, digits and the - character
# example:
# private_objects = Jabber, Skype, Twitter
private_objects = Jabber, Skype, Twitter
# preferred vcard version: 3.0 / 4.0
preferred_version = 3.0
# Look into source vcf files to speed up search queries: yes / no
search_in_source_files = no
# skip unparsable vcard files: yes / no
skip_unparsable = no
khard list
shows all my contacts. So far so good. Apparently there
are some awkward vCard compatibility
issues with creating or modifying
contacts from the khard
end. I ve tried adding one address from
~/.mutt/aliases
using khard
and it seems to at least minimally work for
me, but I haven t explored this very much yet.
I had to install python3-vobject 0.9.4.1-1 from experimental to fix
eventable/vobject#39
saving certain vCard files.
Finally, mutt
integration. I already had set query_command="lbdbq '%s'"
in ~/.muttrc
, and I wanted to keep that in place since I still wanted to
use LDAP querying as well. I had to write a very small amount of code for
this (perhaps I should contribute this to lbdb
upstream?), in
~/.lbdb/modules/m_khard
:
#! /bin/sh
m_khard_query ()
khard email --parsable --remove-first-line --search-in-source-files "$1"
~/.lbdb/rc
now reads as follows (you probably won t want the LDAP
stuff, but I ve included it here for completeness):
MODULES_PATH="$MODULES_PATH $HOME/.lbdb/modules"
METHODS='m_muttalias m_khard m_ldap'
LDAP_NICKS='debian canonical'
~/.mutt/aliases
into the new system. This
is only about 30 contacts so shouldn t take too long.
Overall this feels like a big improvement! It wasn t a trivial amount of
setup for just me, but it means I have both better usability for myself and
more independence from proprietary services, and I think I can add extra
users with much less effort if I need to.
Postscript
A day later and I ve consolidated all my accounts from Google Contacts and
~/.mutt/aliases
into the new system, with the exception of one group that
I had defined as a mutt
alias and need to work out what to do with. This
all went smoothly.
I ve filed the new lbdb
module as
#866178, and the python3-vobject
bug as
#866181.
Next.